home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_olv_jewel.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  68 lines

  1. # Jones 3D Cog Script
  2. #
  3. # olv_Jewel.cog
  4. #
  5. # [TL]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. #
  9. # ========================================================================================
  10. symbols
  11.  
  12. message        startup
  13. message        entered
  14. message        exited
  15.  
  16.     surface    pad                    mask=0x484
  17.     surface    pad2                    mask=0x484
  18.     surface    pad3                    mask=0x484
  19.     thing       plasma
  20.  
  21.     thing        snake0                local
  22.     thing        player                local
  23.     material    mat0=gen_4aplasma_jewel.mat    local       # animating plasma texture
  24.  
  25. end
  26.  
  27. # ========================================================================================
  28. code
  29.  
  30. startup:
  31.     player = GetLocalPlayerThing();
  32.     MaterialAnim(mat0, 9.0, 1);
  33.     return;
  34.  
  35. # ........................................................................................
  36. entered:
  37. if((GetSenderRef() == pad) || (GetSenderRef() == pad2) || (GetSenderRef() == pad3))
  38. {
  39.     if(GetSourceRef() == player) 
  40.     {
  41.         JewelFlyingStatus(1, plasma);                 # Enable jewel flying
  42.     }
  43.     else
  44.     {
  45.         snake0=GetSourceRef();
  46.         if(IsThingModelName(snake0, "gen_sn_a.3do"))
  47.         {
  48.             AIFlee(snake0, player);
  49.         }
  50.     }
  51. }
  52. return;
  53.  
  54. # ........................................................................................
  55. exited:
  56. if((GetSenderRef() == pad) || (GetSenderRef() == pad2) || (GetSenderRef() == pad3))
  57. {
  58. if(GetSourceRef() == player) 
  59.     {
  60.     JewelFlyingStatus(0, plasma);                    # Disable jewel flying
  61.     }
  62. }
  63. return;
  64.  
  65. # ........................................................................................
  66. end
  67.  
  68.